#ifndef _GENERIC_BOX_MODEL_H_JM_20110828_
#define _GENERIC_BOX_MODEL_H_JM_20110828_

#include "bobox_model.hpp"
#include "bobox_box.hpp"

#include "../runtime/BoxParameterPack.h"

namespace jm4bbx {

template <class GeneratedBox> 
class GenericBoxModel : public bobox::box_model {
public:
	typedef GeneratedBox BoxType;

	GenericBoxModel(const BoxParameterPack& p) : 
        bobox::box_model(p.id, p.tid, p.rt), params_(p.params) { }


   virtual bobox::box* create(bobox::box_id_type id, bobox::request* req) const {        
		    return new GeneratedBox(id, tid_, req, params_);      
	}

private:
    bobox::parameters params_;
};

} // namespace jm4bbx

#endif
